package com.zjw.strategy.SumStrategyImpl;

import com.zjw.strategy.SumStrategy;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 总价不满减策略类
 */
@Component
public class NoDiscount4Sum implements SumStrategy {
    @Override
    public double calSum(List<Double> prices) {
        double sumPrice = 0;
        for (Double price : prices) {
            sumPrice+=price;
        }
        return sumPrice;
    }
}
